const Sequelize = require('sequelize');
module.exports = function (sequelize) {
  return sequelize.define(
    "post",  // 表名
    {
      postClass: {  // 帖子标签
        type: Sequelize.STRING(20),
        allowNull: true,
      },
      postTitle: {  // 标题
        type: Sequelize.STRING(20),
        allowNull: false,
      },
      postImg1: {  // 帖子配图
        type: Sequelize.STRING(255),
        allowNull: true,
      },
      postImg2: {  // 帖子配图
        type: Sequelize.STRING(255),
        allowNull: true,
      },
      postImg3: {  // 帖子配图
        type: Sequelize.STRING(255),
        allowNull: true,
      },
      postContent: {  // 内容
        type: Sequelize.TEXT(0),
        allowNull: false,
      }
    }
  )
};